package com.zigong.app.ui.adapter.holder;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;

import com.ruihang.generalibrary.ui.adapter.holder.BaseRecylerHolder;
import com.ruihang.generalibrary.ui.widget.CustomEXImageView;
import com.zigong.app.R;
import com.zigong.app.beans.ImageUr;
import com.zigong.app.ui.utils.GlideUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/7/12 0012.
 */

public class PicHolder extends BaseRecylerHolder<ImageUr> {
    @BindView(R.id.item_pic_pic)
    public CustomEXImageView img;

    public PicHolder(Context context, View itemView) {
        super(context, itemView);
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(ImageUr imgUrl) {
        if (!TextUtils.isEmpty(imgUrl.getImageUrl())) {
            GlideUtil.loadImgWith11Def(context, imgUrl.getImageUrl(), img);
        }
    }


}
